<template>
  <div style="padding: 0px 20px;">
    <flex-box>

      <flex-box-item style="text-align: right;">
        <h2>出入库需求计划</h2>
      </flex-box-item>
      <flex-box-item style="text-align: right;">
        <div>
          <span>{{ month }}月计划</span>
          <span>操作员：{{ name }}</span>
        </div>
        <div>
          <span> {{ now }}</span>
        </div>
      </flex-box-item>
    </flex-box>
    <flex-box class="tips">
      <flex-box-item>
        <span>库存查询</span>
      </flex-box-item>
      <!-- <flex-box-item>
        <span>
          <a href="../../../../demo/demo.html" >3D库区demo</a>
        </span>
      </flex-box-item> -->
    </flex-box>
    <flex-box align-items="flex-start">
      <flex-box-item :span="4" style="padding-top: 0px;">
        <el-form ref="queryForm" :inline="true">
          <el-form-item label="物料" prop="userName">
            <el-select v-model="materialNo" style="width: 100%" filterable clearable placeholder="请选择物料" @change="handleStockQuery">
              <el-option v-for="option in options.materialOptions" :key="option.id" :label="option.skuName" :value="option.materialNo" />
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleStockQuery">搜索</el-button>
          </el-form-item>
        </el-form>
        <el-table :data="page.records" highlight-current-row>
          <el-table-column label="物料" align="center" prop="materialName" show-overflow-tooltip />
          <el-table-column label="库存" align="center" prop="quantity" show-overflow-tooltip />
        </el-table>
        <!-- 分页 -->
        <!--<pagination v-show="page.total>0" :total="page.total" :page.sync="page.current" :limit.sync="page.pageSize" @pagination="handleStockQuery" />-->
      </flex-box-item>
     <!-- <flex-box-item :span="10" class="calendar">
        <flex-box justify-content="center" class="calendar-title">
          <san>入库</san>
        </flex-box>
        <flex-box>
          <el-calendar v-model="calendarValue">
            <template slot="dateCell" slot-scope="{date, data}">
              <div :class="data.isSelected ? 'is-selected' : ''">
                {{ data.day.split('-').slice(2).join('-') }}
                <div v-for="item in receiptList" :key="item.index">
                  <div v-if="item.date == data.day" :value="12" class="item">
                    <el-link type="info" @click="toPage('/tbWmsMaterialReceiptImport/tbWmsMaterialReceiveList', {createTime: data.day})">
                      入库：{{ item.rkQty }}
                    </el-link>
                  </div>
                </div>
              </div>
            </template>
          </el-calendar>
        </flex-box>
      </flex-box-item> -->
   <!--   <flex-box-item class="calendar">
        <flex-box justify-content="center" class="calendar-title">
          <san>出库</san>
        </flex-box>
        <flex-box>
          <el-calendar v-model="calendarValue">
            <template slot="dateCell" slot-scope="{date, data}">
              <div :class="data.isSelected ? 'is-selected' : ''">
                {{ data.day.split('-').slice(2).join('-') }}
                <div v-for="item in deliveryList" :key="item.index">
                  <div v-if="item.date == data.day" :value="12" class="item">
                    <el-link type="info" @click="toPage('/tWmsDeliveryPlanList/index', {createTime: data.day})">
                      出库：{{ item.ckQty }}
                    </el-link>
                    <el-link type="info" @click="toPage('/tFoFreightOrder/index', {createTime: data.day})">
                      发货：{{ item.fhQty }}
                    </el-link>
                  </div>
                </div>
              </div>
            </template>
          </el-calendar>
        </flex-box>
      </flex-box-item> -->
      <el-row :gutter="24">
      	<el-col :span="12">
	<div>
		<el-card :body-style="{ padding: '0px' }" style="margin-top: 20px;">
			<div slot="header" style="padding-left: 10px;">
				<span>入库一览</span>
			</div>
			<div>
				<div style="padding-left: 20px;">

		      <el-row :gutter="24" style="margin-top: 10px;">
		      	<el-col :span="6">
  <el-button type="text">{{  this.month }}</el-button>
		      	</el-col> 	<el-col :span="6">
  <el-button type="primary" @click="handleLoadLastMonth()"><<上个月</el-button>
		      	</el-col> 	<el-col :span="6">
  <el-button type="primary" @click="handleLoadNextMonth()">下个月>></el-button>
		      	</el-col> 	<el-col :span="6">

		      	</el-col>
		      </el-row>
				</div>
				<el-table ref="calendarTable" :data="inboundMonthList"
					style="margin-top: 20px;" element-loading-text="Loading" border stripe fit
					highlight-current-row>
					<!-- <el-table-column label="操作" align="center" fixed="left" width="50">
						<template slot-scope="scope">
							<el-button type="text"
								@click="handleAddDistribution(scope.row)">装车</el-button>
						</template>
					</el-table-column> -->
		  <!--     <td height=25><ww:property value="sundate"/><br><b><a href="../webOrder/<ww:property value="sunLink"/>" target="_blank"><ww:property value="sun"/></a></b></br></td>
		                                                  <td height=25><ww:property value="mondate"/><br><b><a href="../webOrder/<ww:property value="monLink"/>" target="_blank"><ww:property value="mon"/></a></b></br></td>
		                                                 <td height=25><ww:property value="tuedate"/><br><b><a href="../webOrder/<ww:property value="tueLink"/>" target="_blank"><ww:property value="tue"/></a></b></br></td>
		                                                <td height=25><ww:property value="weddate"/><br><b><a href="../webOrder/<ww:property value="wedLink"/>" target="_blank"><ww:property value="wed"/></a></b></br></td>
		                                                <td height=25><ww:property value="thudate"/><br><b><a href="../webOrder/<ww:property value="thuLink"/>" target="_blank"><ww:property value="thu"/></a></b></br></td>
		                                                <td height=25><ww:property value="fridate"/><br><b><a href="../webOrder/<ww:property value="friLink"/>" target="_blank"><ww:property value="fri"/></a></b></br></td>
		                                               <td height=25><ww:property value="satdate"/><br><b><a href="../webOrder/<ww:property value="satLink"/>" target="_blank"><ww:property value="sat"/></a></b></br></td>
 -->
					<el-table-column prop="sundate" label="周日" align="center"
						show-overflow-tooltip width="100" >
          <template slot-scope="scope">

            <el-row :gutter="3" style="margin-top: 0px;" >
            	<el-col :span="3">
            <el-button type="text">{{ scope.row.sundate }}</el-button> </el-col>
              </el-row>
                <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
                 <el-button  v-if=" scope.row.sundate  != ``" type="text" @click="handleIWView(scope.row.sundayLink)">入库数：{{ scope.row.sun }}</el-button>
              </el-col>
              </el-row>
          </template>
           </el-table-column>
<el-table-column prop="mondate" label="周一" align="center"
						show-overflow-tooltip width="100" >
          <template slot-scope="scope">

            <el-row :gutter="3" style="margin-top: 0px;" >
            	<el-col :span="3">
            <el-button type="text">{{ scope.row.mondate }}</el-button> </el-col>
              </el-row>
                <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
              <el-button  v-if=" scope.row.mondate  != ``" type="text" @click="handleIWView(scope.row.mondayLink)">入库数：{{ scope.row.mon }}</el-button>
              </el-col>
              </el-row>

          </template>
           </el-table-column>
	<el-table-column prop="tuedate" label="周二" align="center"
							show-overflow-tooltip width="100" >
	          <template slot-scope="scope">

              <el-row :gutter="3" style="margin-top: 0px;" >
              	<el-col :span="3">
              <el-button type="text">{{ scope.row.tuedate }}</el-button> </el-col>
                </el-row>
                  <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
                <el-button v-if=" scope.row.tuedate  != ``"  type="text" @click="handleIWView(scope.row.tuesdayLink)">入库数：{{ scope.row.tue }}</el-button>
                </el-col>
                </el-row>
              </template>

	           </el-table-column>
             <el-table-column prop="weddate" label="周三" align="center"
             						show-overflow-tooltip width="100" >
                       <template slot-scope="scope">
                    <el-row :gutter="3" style="margin-top: 0px;" >
                    	<el-col :span="3">
                    <el-button type="text">{{ scope.row.weddate }}</el-button> </el-col>
                      </el-row>
                        <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
                      <el-button v-if=" scope.row.weddate  != ``"   type="text" @click="handleIWView(scope.row.wedsdayLink)">入库数：{{ scope.row.wed }}</el-button>
                      </el-col>
                      </el-row>
                       </template>
                        </el-table-column>

             <el-table-column prop="thudate" label="周四" align="center"
             						show-overflow-tooltip width="100" >
                       <template slot-scope="scope">

                         <el-row :gutter="3" style="margin-top: 0px;" >
                         	<el-col :span="3">
                         <el-button type="text">{{ scope.row.thudate }}</el-button> </el-col>
                           </el-row>
                             <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
                           <el-button v-if=" scope.row.thudate  != ``"    type="text" @click="handleIWView(scope.row.thursdayLink)">入库数：{{ scope.row.thu }}</el-button>
                           </el-col>
                           </el-row>
                       </template>
                        </el-table-column>
             <el-table-column prop="fridate" label="周五" align="center"
             						show-overflow-tooltip width="100" >
                       <template slot-scope="scope">

                         <el-row :gutter="3" style="margin-top: 0px;" >
                         	<el-col :span="3">
                         <el-button type="text">{{ scope.row.fridate }}</el-button> </el-col>
                           </el-row>
                             <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
                           <el-button  v-if=" scope.row.fridate  != ``"   type="text" @click="handleIWView(scope.row.fridayLink)">入库数：{{ scope.row.fri }}</el-button>
                           </el-col>
                           </el-row>
                       </template>
                        </el-table-column>
                        <el-table-column prop="satdate" label="周六" align="center"
                        						show-overflow-tooltip width="100" >
                                  <template slot-scope="scope">

                                    <el-row :gutter="3" style="margin-top: 0px;" >
                                    	<el-col :span="3">
                                    <el-button type="text">{{ scope.row.satdate }}</el-button> </el-col>
                                      </el-row>
                                        <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
                                      <el-button  v-if=" scope.row.satdate  != ``"   type="text" @click="handleIWView(scope.row.saturdayLink)">入库数：{{ scope.row.sat }}</el-button>
                                      </el-col>
                                      </el-row>
                                  </template>
                                   </el-table-column>
				</el-table>
			</div>
		</el-card>
	</div>
          </el-col>
          <el-col :span="12">
	<div>
		<el-card :body-style="{ padding: '0px' }" style="margin-top: 20px;">
			<div slot="header" style="padding-left: 10px;">
				<span>出库一览</span>
			</div>
			<div>
				<div style="padding-left: 20px;">

		      <el-row :gutter="24" style="margin-top: 10px;">
          <el-col :span="6">
          <el-button type="text">{{  this.outMonth }}</el-button>
          	      	</el-col> 	<el-col :span="6">
          <el-button type="primary" @click="handleOutBoundLoadLastMonth()"><<上个月</el-button>
          	      	</el-col> 	<el-col :span="6">
          <el-button type="primary" @click="handleOutBoundLoadNextMonth()">下个月>></el-button>
          	      	</el-col> 	<el-col :span="6">

          	      	</el-col>
		      </el-row>
				</div>
				<el-table ref="calendarTable" :data="outboundMonthList"
					style="margin-top: 20px;" element-loading-text="Loading" border stripe fit
					highlight-current-row>
					<!-- <el-table-column label="操作" align="center" fixed="left" width="50">
						<template slot-scope="scope">
							<el-button type="text"
								@click="handleAddDistribution(scope.row)">装车</el-button>
						</template>
					</el-table-column> -->


				<el-table-column prop="sundate" label="周日" align="center"
										show-overflow-tooltip width="100" >
				          <template slot-scope="scope">

				            <el-row :gutter="3" style="margin-top: 0px;" >
				            	<el-col :span="3">
				            <el-button type="text">{{ scope.row.sundate }}</el-button> </el-col>
				              </el-row>
				                <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
				                 <el-button  v-if=" scope.row.sundate  != ``" type="text" @click="handleOWView(scope.row.sundayLink)">出库数：{{ scope.row.sunP }}</el-button>
				              </el-col>
				              </el-row>
				          </template>
				           </el-table-column>
				<el-table-column prop="mondate" label="周一" align="center"
										show-overflow-tooltip width="100" >
				          <template slot-scope="scope">

				            <el-row :gutter="3" style="margin-top: 0px;" >
				            	<el-col :span="3">
				            <el-button type="text">{{ scope.row.mondate }}</el-button> </el-col>
				              </el-row>
				                <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
				              <el-button  v-if=" scope.row.mondate  != ``" type="text" @click="handleOWView(scope.row.mondayLink)">出库数：{{ scope.row.monP }}</el-button>
				              </el-col>
				              </el-row>

				          </template>
				           </el-table-column>
					<el-table-column prop="tuedate" label="周二" align="center"
											show-overflow-tooltip width="100" >
					          <template slot-scope="scope">

				              <el-row :gutter="3" style="margin-top: 0px;" >
				              	<el-col :span="3">
				              <el-button type="text">{{ scope.row.tuedate }}</el-button> </el-col>
				                </el-row>
				                  <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
				                <el-button v-if=" scope.row.tuedate  != ``"  type="text" @click="handleOWView(scope.row.tuesdayLink)">出库数：{{ scope.row.tueP }}</el-button>
				                </el-col>
				                </el-row>
				              </template>

					           </el-table-column>
				             <el-table-column prop="weddate" label="周三" align="center"
				             						show-overflow-tooltip width="100" >
				                       <template slot-scope="scope">
				                    <el-row :gutter="3" style="margin-top: 0px;" >
				                    	<el-col :span="3">
				                    <el-button type="text">{{ scope.row.weddate }}</el-button> </el-col>
				                      </el-row>
				                        <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
				                      <el-button v-if="scope.row.weddate != ``"  type="text" @click="handleOWView(scope.row.wedsdayLink)">出库数：{{ scope.row.wedP }}</el-button>
				                      </el-col>
				                      </el-row>
				                       </template>
				                        </el-table-column>

				             <el-table-column prop="thudate" label="周四" align="center"
				             						show-overflow-tooltip width="100" >
				                       <template slot-scope="scope">

				                         <el-row :gutter="3" style="margin-top: 0px;" >
				                         	<el-col :span="3">
				                         <el-button type="text">{{ scope.row.thudate }}</el-button> </el-col>
				                           </el-row>
				                             <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
				                           <el-button v-if="scope.row.thudate != ``"    type="text" @click="handleOWView(scope.row.thursdayLink)">出库数：{{ scope.row.thuP }}</el-button>
				                           </el-col>
				                           </el-row>
				                       </template>
				                        </el-table-column>
				             <el-table-column prop="fridate" label="周五" align="center"
				             						show-overflow-tooltip width="100" >
				                       <template slot-scope="scope">

				                         <el-row :gutter="3" style="margin-top: 0px;" >
				                         	<el-col :span="3">
				                         <el-button type="text">{{ scope.row.fridate }}</el-button> </el-col>
				                           </el-row>
				                             <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
				                           <el-button  v-if=" scope.row.fridate  != ``"   type="text" @click="handleOWView(scope.row.fridayLink)">出库数：{{ scope.row.friP }}</el-button>
				                           </el-col>
				                           </el-row>
				                       </template>
				                        </el-table-column>
				                        <el-table-column prop="satdate" label="周六" align="center"
				                        						show-overflow-tooltip width="100" >
				                                  <template slot-scope="scope">

				                                    <el-row :gutter="3" style="margin-top: 0px;" >
				                                    	<el-col :span="3">
				                                    <el-button type="text">{{ scope.row.satdate }}</el-button> </el-col>
				                                      </el-row>
				                                        <el-row :gutter="6" style="margin-top: 0px;">	<el-col :span="3">
				                                      <el-button  v-if=" scope.row.satdate  != ``"   type="text" @click="handleOWView(scope.row.saturdayLink)">出库数：{{ scope.row.satP }}</el-button>
				                                      </el-col>
				                                      </el-row>
				                                  </template>
				                                   </el-table-column>
				</el-table>
			</div>
		</el-card>
	</div>
            </el-col>
            </el-row>
    </flex-box>
    <flex-box class="tips">
      <flex-box-item>
        <el-row :gutter="24">
          <el-col :xs="12" :sm="12" :lg="12">
            <div class="chart-wrapper">
              <pie-chart />
            </div>
          </el-col>
          <el-col :xs="12" :sm="12" :lg="12">
            <div class="chart-wrapper">
              <bar-chart />
            </div>
          </el-col>
        </el-row>
      </flex-box-item>
    </flex-box>
    <flex-box>
      <flex-box-item>
        <el-table :data="orderList" style="width: 100%" stripe border>
          <el-table-column label="订单代码" align="center" prop="orderNo" show-overflow-tooltip />
          <el-table-column label="预定发货日期" align="center" prop="deliveryDate" show-overflow-tooltip />
          <el-table-column label="预定到货日期" align="center" prop="receivedDate" show-overflow-tooltip />
          <el-table-column label="发货数量" align="center" prop="deliveryQty" show-overflow-tooltip />
          <el-table-column label="单位" align="center" prop="unit" show-overflow-tooltip />
          <el-table-column label="状态" align="center" prop="status" show-overflow-tooltip />
        </el-table>
      </flex-box-item>
    </flex-box>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import PieChart from './components/PieChart'
import BarChart from './components/BarChart'
import TWhWarehouseCustomerMaterialApi from '@/api/pms/TWhWarehouseCustomerMaterialApi'
import TbWmsMaterialInLocationApi from '@/api/web/TbWmsMaterialInLocationApi'
import MyCalendarApi from '@/api/basic/MyCalendarApi'

const lineChartData = {
  newVisitis: {
    expectedData: [100, 120, 161, 134, 105, 160, 165],
    actualData: [120, 82, 91, 154, 162, 140, 145]
  },
  messages: {
    expectedData: [200, 192, 120, 144, 160, 130, 140],
    actualData: [180, 160, 151, 106, 145, 150, 130]
  },
  purchases: {
    expectedData: [80, 100, 121, 104, 105, 90, 100],
    actualData: [120, 90, 100, 138, 142, 130, 130]
  },
  shoppings: {
    expectedData: [130, 140, 141, 142, 145, 150, 160],
    actualData: [120, 82, 91, 154, 162, 140, 130]
  }
}

export default {
  name: 'Calendar',
  components: {
    PieChart,
    BarChart
  },
  computed: {
    ...mapGetters([
      'userInfo',
      'name'
    ])
  },
  data() {
    return {
      options: {
        materialOptions: []
      },
      month: null,
      outMonth: null,
      year: null,
      mon: null,

      outyear: null,
      outmon: null,
      searchMonth: null,
      searchOutMonth: null,
      now: null,
      materialNo: null,
      page: {
        current: 1,
        pageSize: 10,
        total: 0,
        records: []
      },
      calendarValue: '2022-06-15',
      receiptList: [
        { date: '2022-06-15', rkQty: 8 },
        { date: '2022-06-16', rkQty: 9 }
      ],
      deliveryList: [
        { date: '2022-06-15', ckQty: 17, fhQty: 15 },
        { date: '2022-06-16', ckQty: 28, fhQty: 25 }
      ],
      inboundMonthList: [],
      outboundMonthList: [],
      orderList: [
       /* {
          orderNo: '20220101',
          deliveryDate: '2022-01-01',
          receivedDate: '2022-02-01',
          deliveryQty: 10,
          unit: 10,
          status: 10
        } */
      ],
      loading: false
    }
  },
  mounted() {
    setInterval(() => {
      this.now = this.parseTime(new Date(), '{y}/{m}/{d} {h}:{i}:{s}')
    }, 1000)
    this.month = this.parseTime(new Date(), '{y}/{m}')
    this.year = this.parseTime(new Date(), '{y}')
    this.mon = this.parseTime(new Date(), '{m}')

    this.outMonth = this.parseTime(new Date(), '{y}/{m}')
    this.outyear = this.parseTime(new Date(), '{y}')
    this.outmon = this.parseTime(new Date(), '{m}')

    this.getMaterialList()
  },
  methods: {
    getMaterialList() {

      const params = {
        customerNo: this.userInfo.customerId,
        month: this.parseTime(new Date(), '{y}/{m}/{d}')
      }
      TWhWarehouseCustomerMaterialApi.list(params).then(response => {
        this.options.materialOptions = response.data
      })
      MyCalendarApi.list(params).then(response => {
        this.inboundMonthList = response.data
        this.outboundMonthList = response.data
      })

    },
    getOutBoundPreViousMonth(){
     var year =  this.outyear
     var mon = this.outmon
     mon = parseInt(mon);

      if(mon!=1){
         mon=mon-1
         if(mon<10){
           mon = "0"+mon
         }
         this.outmon = mon
      }else{
        mon = '12'
        year = parseInt(year);
        year =year-1
        this.outyear = year
        this.outmon = mon
      }
      this.searchOutMonth = year+'/'+mon
      this.outMonth = year+'/'+mon

    },
    getOutBoundNextMonth(){
       var year =  this.outyear
       var mon = this.outmon
        mon = parseInt(mon);

       if(mon!=12){
          mon=mon+1

         this.outmon = mon
       }else{
         mon = '1'
         year = parseInt(year);
         year =year+1
          this.outyear = year
          this.outmon = mon
       }
       this.searchOutMonth = year+'/'+mon
       this.outMonth = year+'/'+mon

    },
    getPreViousMonth(){
     var year =  this.year
     var mon = this.mon
     mon = parseInt(mon);

      if(mon!=1){
         mon=mon-1

         this.mon = mon
      }else{
        mon = '12'
        year = parseInt(year);
        year =year-1
        this.year = year
        this.mon = mon
      }
      this.searchMonth = year+'/'+mon
      this.month = year+'/'+mon

    },
    getNextMonth(){
       var year =  this.year
       var mon = this.mon
        mon = parseInt(mon);

       if(mon!=12){
          mon=mon+1

         this.mon = mon
       }else{
         mon = '1'
         year = parseInt(year);
         year =year+1
          this.year = year
          this.mon = mon
       }
       this.searchMonth = year+'/'+mon
       this.month = year+'/'+mon

    },
    handleOutBoundLoadLastMonth(){
      this.getOutBoundPreViousMonth();
      const params = {
        customerNo: this.userInfo.customerId,
        month: this.searchOutMonth
      }
      MyCalendarApi.list(params).then(response => {
      //  this.inboundMonthList = response.data
          this.outboundMonthList = response.data
      })
    },
    handleOutBoundLoadNextMonth(){
    this.getOutBoundNextMonth();
    const params = {
      customerNo: this.userInfo.customerId,
      month: this.searchOutMonth
    }
    MyCalendarApi.list(params).then(response => {
    // this.inboundMonthList = response.data
        this.outboundMonthList = response.data
    })
    },
    handleLoadLastMonth(){
      this.getPreViousMonth();
      const params = {
        customerNo: this.userInfo.customerId,
        month: this.searchMonth
      }
      MyCalendarApi.list(params).then(response => {
        this.inboundMonthList = response.data
      //    this.outboundMonthList = response.data
      })
    },
    handleLoadNextMonth(){
    this.getNextMonth();
    const params = {
      customerNo: this.userInfo.customerId,
      month: this.searchMonth
    }
    MyCalendarApi.list(params).then(response => {
      this.inboundMonthList = response.data
     //   this.outboundMonthList = response.data
    })
    },
    handleStockQuery() {
      const params = {
        materialNo: this.materialNo
      }
      TbWmsMaterialInLocationApi.page(params, this.page).then(response => {
        this.page.records = response.data.records
        this.page.total = response.data.total
        this.loading = false
      }, () => {
        this.loading = false
      })
    },

  handleOWView(row) {
      this.$router.push({ path: '/tbWmsMaterialReceipt/tbWmsMaterialReceiptCalendarView/' + row })
    },
    handleIWView(row) {
      this.$router.push({ path: '/tbWmsMaterialDelivery/tbWmsMaterialDeliveryCalendarView/' + row })
    },
    toPage(router, params) {
      this.$router.push({
        path: router,
        query: {
          ...params
        }
      })
    },
    goTo(){
      let routeObj = this.$router.resolve({
              path: '../'
            },
            this.$route,
            "append"
          );
          //打印查看路由对象
          console.log(routeObj);
    }
  }
}
</script>

<style lang="scss" scoped>
.tips {
  padding: 10px;
  border: 1px solid #ebebeb;
  border-radius: 3px;
  transition: .2s;
}
.calendar-title {
  padding: 10px;
  border-bottom: 1px solid #ebebeb;
}
.calendar {
  border: 1px solid #ebebeb;
  border-radius: 3px;
  transition: .2s;
  ::v-deep .el-calendar__body {
    padding: 2px 0px;
  }
  ::v-deep .el-calendar-table thead th {
    padding: 12px 12px;
  }
}
</style>
